import sha1 from "js-sha1";
export function MyEncrypt(input:string){
    let outputArr:string[] = [];
    let afterSha1:string = sha1(input);
    // 奇偶调换
    for(let i=0; i<afterSha1.length; i++){
        if(i%2 == 1){
           outputArr.push(afterSha1[i-1]); 
        }else{
            outputArr.push(afterSha1[i+1])
        }
    }
    let output = outputArr.join('');
    return output;
}